#!/usr/bin/python
# _*_ coding:utf-8 _*_

import cv2


def click_able(image):
    pc = 3
    len = 10
    rows, cols, channels = image.shape
    count = 0
    for x in range(0, rows):
        for y in range(0, cols):
            c = image[x, y]
            if abs(c[0] - 224) < pc and c[1] > 200:
                if count > len:
                    return True, (c[0], c[1], c[2])
                count = count + 1
    return False, None

if __name__ == '__main__':
    for i in range(0, 6):
        frame = cv2.imread(str(i) + '.png')
        print(i, click_able(frame))
